package com.pan.common.interview.thread.threadResult;

import java.util.concurrent.Callable;


/**
 * 两种处理多线程返回值的方式
 * 1、FutureTask
 * 2、线程池
 */
public class MyCallable implements Callable<String> {
    @Override
    public String call() throws Exception{
        String value="test";
        System.out.println("Ready to work");
        Thread.currentThread().sleep(2000);
        System.out.println("task done");
        return  value;
    }

}
